package com.ozo.cloud.gen.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ozo.cloud.gen.pojo.bo.GenTableBO;
import com.ozo.cloud.gen.pojo.bo.GenTableColumnBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 数据库 Mapper 接口
 * </p>
 *
 * @author qiangesoft
 * @date 2024-10-11
 */
public interface DbMapper {

    /**
     * 表分页
     *
     * @param page
     * @param dbType
     * @param tableName
     * @param ignoreTableNameList
     * @return
     */
    Page<GenTableBO> pageTable(Page<GenTableBO> page, @Param("dbType") String dbType,
                               @Param("tableName") String tableName, @Param("ignoreTableNameList") List<String> ignoreTableNameList);

    /**
     * 表列表
     *
     * @param dbType
     * @param tableName
     * @return
     */
    List<GenTableBO> listTable(@Param("dbType") String dbType, @Param("tableName") String tableName);

    /**
     * 获取表字段
     *
     * @param dbType
     * @param tableNames
     * @return
     */
    List<GenTableColumnBO> listTableColumn(@Param("dbType") String dbType, @Param("tableNames") List<String> tableNames);

}
